package com.rabbiter.market.service.goods_management.goods.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rabbiter.market.domain.goods.goods_info.GoodsImage;
import com.rabbiter.market.mapper.goods.goods_info.GoodsImageMapper;
import com.rabbiter.market.service.goods_management.goods.IGoodsImageService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class GoodsImageServiceImpl extends ServiceImpl<GoodsImageMapper, GoodsImage> implements IGoodsImageService {

    @Override
    public void insertBatch(List<GoodsImage> imageList) {
        super.saveBatch(imageList);
    }

    @Override
    public List<GoodsImage> selectList(Long id) {
        return baseMapper.selectBatchIds(Collections.singletonList(id));
    }

    @Override
    public void deleteByGoodsIds(List<Long> ids) {
        baseMapper.deleteBatchIds(ids);
    }
}
